package com.xyy.jd_clund.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;

import java.util.concurrent.Executors;


@Configuration
public class ScheduleConfig implements SchedulingConfigurer {
    @Override
    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
        // 配置线程池的大小：需要根据实际的电脑配置来调整
        scheduledTaskRegistrar.setScheduler(Executors.newScheduledThreadPool(10));
    }
}